* {
  margin: 0;
  padding: 0;
}
body {
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at bottom, #1a2633, #0b0d13);
  overflow: hidden;
}
.sky {
  width: 100%;
  height: 100%;
  /* perspective */
  perspective: 5000px;
  /* Let the child have its own 3D axis */
  transform-style: preserve-3d;
}
.stars {
  position: relative;
  width: 100%;
  height: 100%;
  margin-left: -3px;
  margin-top: -3px;
  /* Cannot fix the star position */
  /* transform: translate3d(); */
  transform-style: preserve-3d;
  animation: rotate 60s linear infinite;
  /* transform-origin: 50% 50% -500px; */
}
.star {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  transform-style: preserve-3d;
}
.slide {
  width: 6px;
  height: 6px;
  background-color: #ff0;
  border-radius: 50%;
  animation: fade 5s linear infinite;
}
.light {
  position: absolute;
  left: -47px;
  width: 100px;
  height: 6px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
}
.light:nth-child(1) {
  transform: rotate(90deg);
}
.light:nth-child(2) {
  transform: rotate(150deg);
}
.light:nth-child(3) {
  transform: rotate(210deg);
}

.counter {
  /* Anti-turn, can be canceled */
  animation: rotate 60s linear infinite reverse;
  transform-style: preserve-3d;
}

/* Define up motion, transparency change, position move */
@keyframes fade {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  40% {
    opacity: 1;
  }
  50% {
    transform: translateY(-100px);
    opacity: 0;
  }
  100% {
    transform: translateY(-100px);
    opacity: 0;
  }
}

/* Overall rotation */
@keyframes rotate {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
